/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ucb.ProjetoFinal.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author DCBorges
 */
@Entity
@Table(name = "sdctb015_hsto_fgts")
public class HistoricoFgts implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_SQNCL_FGTS")
    private Integer nuSqnclFgts;
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_CNPJ_EMPREGADOR")
    private long nuCnpjEmpregador;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @NotNull
    @Column(name = "VR_REMUNERACAO")
    private BigDecimal vrRemuneracao;
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_MES_CMPTNCA")
    private short nuMesCmptnca;
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_ANO_CMPTNCA")
    private short nuAnoCmptnca;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "NO_PRTCE_INTERFACE")
    private String noPrtceInterface;
    @JoinColumns({
        @JoinColumn(name = "NU_SNQCL_GRPO_FMLR", referencedColumnName = "NU_SNQCL_GRPO_FMLR"),
        @JoinColumn(name = "NU_SQNCL_PRTE", referencedColumnName = "NU_SQNCL_PRTE")})
    @ManyToOne(optional = false)
    private ParticipanteGrupo participanteGrupo;

    public HistoricoFgts() {
    }

    public HistoricoFgts(Integer nuSqnclFgts) {
        this.nuSqnclFgts = nuSqnclFgts;
    }

    public HistoricoFgts(Integer nuSqnclFgts, long nuCnpjEmpregador, BigDecimal vrRemuneracao, short nuMesCmptnca, short nuAnoCmptnca, String noPrtceInterface) {
        this.nuSqnclFgts = nuSqnclFgts;
        this.nuCnpjEmpregador = nuCnpjEmpregador;
        this.vrRemuneracao = vrRemuneracao;
        this.nuMesCmptnca = nuMesCmptnca;
        this.nuAnoCmptnca = nuAnoCmptnca;
        this.noPrtceInterface = noPrtceInterface;
    }

    public Integer getNuSqnclFgts() {
        return nuSqnclFgts;
    }

    public void setNuSqnclFgts(Integer nuSqnclFgts) {
        this.nuSqnclFgts = nuSqnclFgts;
    }

    public long getNuCnpjEmpregador() {
        return nuCnpjEmpregador;
    }

    public void setNuCnpjEmpregador(long nuCnpjEmpregador) {
        this.nuCnpjEmpregador = nuCnpjEmpregador;
    }

    public BigDecimal getVrRemuneracao() {
        return vrRemuneracao;
    }

    public void setVrRemuneracao(BigDecimal vrRemuneracao) {
        this.vrRemuneracao = vrRemuneracao;
    }

    public short getNuMesCmptnca() {
        return nuMesCmptnca;
    }

    public void setNuMesCmptnca(short nuMesCmptnca) {
        this.nuMesCmptnca = nuMesCmptnca;
    }

    public short getNuAnoCmptnca() {
        return nuAnoCmptnca;
    }

    public void setNuAnoCmptnca(short nuAnoCmptnca) {
        this.nuAnoCmptnca = nuAnoCmptnca;
    }

    public String getNoPrtceInterface() {
        return noPrtceInterface;
    }

    public void setNoPrtceInterface(String noPrtceInterface) {
        this.noPrtceInterface = noPrtceInterface;
    }

    public ParticipanteGrupo getParticipanteGrupo() {
        return participanteGrupo;
    }

    public void setParticipanteGrupo(ParticipanteGrupo participanteGrupo) {
        this.participanteGrupo = participanteGrupo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nuSqnclFgts != null ? nuSqnclFgts.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HistoricoFgts)) {
            return false;
        }
        HistoricoFgts other = (HistoricoFgts) object;
        if ((this.nuSqnclFgts == null && other.nuSqnclFgts != null) || (this.nuSqnclFgts != null && !this.nuSqnclFgts.equals(other.nuSqnclFgts))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ucb.ProjetoFinal.domain.HistoricoFgts[ nuSqnclFgts=" + nuSqnclFgts + " ]";
    }
}
